package com.mrd.gtimpframe.entity;

import com.mrd.util.StringUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * T_BIZ_DECLA_REJECT_RECORD
 *
 * @author dusy  2017-08-01 记录报关单驳回记录，包括驳回发起人、受理人、各个时间、原因、处理结果
 */
public class RejectRecord implements Serializable {
    /**
     * null
     */
    private String id;

    /**
     * 报关单ID
     */
    private String did;

    /**
     * 客户 CUSTOMER 供应商 SUPPLIER
     */
    private String initiatorRole;

    /**
     * 发起人
     */
    private String initiator;

    /**
     * 发起时间
     */
    private Date initiatedTime;

    /**
     * 其他驳回原因
     */
    private String otherRejectReason;

    /**
     * 备注
     */
    private String initRemark;

    /**
     * 受理人
     */
    private String acceptor;

    /**
     * 受理时间
     */
    private Date acceptedTime;

    /**
     * INITIATED 发起驳回 ACCEPTED  同意驳回 NOT_ACCEPTED 不同意驳回 CHARGEBACK 海关退单
     */
    private String acceptedResult;

    /**
     * 受理意见
     */
    private String acceptedOpinion;

    /**
     * 保留字段
     */
    private String status;

    /**
     * 处理时的驳回原因(不同意原因)，填数据字典ID
     */
    private String dealWithNpReason;

    /**
     * 驳回原因
     */
    private String rejectReason;

    /**
     * 驳回原因
     */
    private String rejectReasonId;

    /**
     * 发起人名字
     */
    private String initiatorName;
    /**
     * 受理人名字
     */
    private String acceptorName;
    /**
     * 不同意驳回原因
     */
    private String notAcceptReason;

    private Declaration declaration;

    /**
     * T_BIZ_DECLA_REJECT_RECORD
     */
    private static final long serialVersionUID = 1L;

    public RejectRecord() {
    }

    public RejectRecord(String did, String initiatorRole, String initiator, String initRemark) {
        this.id = StringUtils.getUUID();
        this.did = did;
        this.initiatorRole = initiatorRole;
        this.initiator = initiator;
        this.initiatedTime = new Date();
        this.initRemark = initRemark;
        this.acceptedResult = "INITIATED";
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getDid() {
        return did;
    }

    public void setDid(String did) {
        this.did = did == null ? null : did.trim();
    }

    public String getInitiatorRole() {
        return initiatorRole;
    }

    public void setInitiatorRole(String initiatorRole) {
        this.initiatorRole = initiatorRole == null ? null : initiatorRole.trim();
    }

    public String getInitiator() {
        return initiator;
    }

    public void setInitiator(String initiator) {
        this.initiator = initiator == null ? null : initiator.trim();
    }

    public Date getInitiatedTime() {
        return initiatedTime;
    }

    public void setInitiatedTime(Date initiatedTime) {
        this.initiatedTime = initiatedTime;
    }

    public String getOtherRejectReason() {
        return otherRejectReason;
    }

    public void setOtherRejectReason(String otherRejectReason) {
        this.otherRejectReason = otherRejectReason == null ? null : otherRejectReason.trim();
    }

    public String getInitRemark() {
        return initRemark;
    }

    public void setInitRemark(String initRemark) {
        this.initRemark = initRemark == null ? null : initRemark.trim();
    }

    public String getAcceptor() {
        return acceptor;
    }

    public void setAcceptor(String acceptor) {
        this.acceptor = acceptor == null ? null : acceptor.trim();
    }

    public Date getAcceptedTime() {
        return acceptedTime;
    }

    public void setAcceptedTime(Date acceptedTime) {
        this.acceptedTime = acceptedTime;
    }

    public String getAcceptedResult() {
        return acceptedResult;
    }

    public void setAcceptedResult(String acceptedResult) {
        this.acceptedResult = acceptedResult == null ? null : acceptedResult.trim();
    }

    public String getAcceptedOpinion() {
        return acceptedOpinion;
    }

    public void setAcceptedOpinion(String acceptedOpinion) {
        this.acceptedOpinion = acceptedOpinion == null ? null : acceptedOpinion.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getDealWithNpReason() {
        return dealWithNpReason;
    }

    public void setDealWithNpReason(String dealWithNpReason) {
        this.dealWithNpReason = dealWithNpReason == null ? null : dealWithNpReason.trim();
    }

    public String getRejectReasonId() {
        return rejectReasonId;
    }

    public void setRejectReasonId(String rejectReasonId) {
        this.rejectReasonId = rejectReasonId == null ? null : rejectReasonId.trim();
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason == null ? null : rejectReason.trim();
    }

    public String getInitiatorName() {
        return initiatorName;
    }

    public void setInitiatorName(String initiatorName) {
        this.initiatorName = initiatorName;
    }

    public String getAcceptorName() {
        return acceptorName;
    }

    public void setAcceptorName(String acceptorName) {
        this.acceptorName = acceptorName;
    }

    public Declaration getDeclaration() {
        return declaration;
    }

    public void setDeclaration(Declaration declaration) {
        this.declaration = declaration;
    }

    public String getNotAcceptReason() {
        return notAcceptReason;
    }

    public void setNotAcceptReason(String notAcceptReason) {
        this.notAcceptReason = notAcceptReason;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", did=").append(did);
        sb.append(", initiatorRole=").append(initiatorRole);
        sb.append(", initiator=").append(initiator);
        sb.append(", initiatedTime=").append(initiatedTime);
        sb.append(", otherRejectReason=").append(otherRejectReason);
        sb.append(", initRemark=").append(initRemark);
        sb.append(", acceptor=").append(acceptor);
        sb.append(", acceptedTime=").append(acceptedTime);
        sb.append(", acceptedResult=").append(acceptedResult);
        sb.append(", acceptedOpinion=").append(acceptedOpinion);
        sb.append(", status=").append(status);
        sb.append(", dealWithNpReason=").append(dealWithNpReason);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}